<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>
<title>申请书审核</title>
<style type="text/css">
.button_orange { 
	height:25px; font-size:12px; color:#cc3300; border:1px #cc9933 solid; 
	background:url(${res}/images/button_orange.gif); padding:0 15px; *padding:0 10px;
	_padding:0 10px; cursor: pointer;
}

</style>
</head>
<body>
	<input type="hidden" id="childDiv" class="thickbox" />
		<form method="post" id="mainForm">
			<input type="hidden" id="prpCodes" name="prpCodes" value="" />
			<input type="hidden" id="type" name="type" value="" />
		</form>
	<br/>
	<div class="soBox">
		<div class="detail ico_search">
			<table>
				<tr>
					<td rowspan="2"><strong>检索条件：</strong>
					</td>
					<td>
						<input type="text" class="input_text" id="slprpno" name="slprpno" value="" onkeyup="javascript:slEvent2(event);" onkeypress="javascript:slEvent(event);" />
						<input type="hidden" class="input_text" id="hid_slprpno" name="hid_slprpno" value="-1" />
						&nbsp;&nbsp;&nbsp;
						<input type='button' id='searchBt' class="button_an" value='查询' onclick="javascript:handQuery()"/>
						
						<input type='button' id='searchBt' class="button_an" value='清空数据' onclick="javascript:clearQuery()"/>
					</td>
				</tr>
				<tr style="display: none">
				<td>
					<div class="clear_h10"></div>
					<input type='button' id='resetBT' class="button_an_clean" style="margin-left: 1em;" value='重置' onclick="cleanQueryBox();" />
				</td>
				</tr>
				<tr style="display:none">
					<td></td>
					<td>（您可以通过点击下拉框选择不同的检索条件。例如：单位已经确认的项目，可以通过“申请状态”中的“等待基金委用户确认”条件查出）</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="clear_h10"></div>
	<div>
		<div id='TopBarMnt'></div>
		<table id='dataGrid'></table>
		<div id='dataBar'></div>
	</div>
	<script type="text/javascript">
	var irisGrid = new IrisGrid("dataGrid", "dataBar", 'TopBarMnt');
	var prcWin = new progressWin("${res}");//初始化遮罩层
	var currefresh = true;
	var getSelOpt = function() {
		var g = "";
		$("input:checkbox[id^=jqg_dataGrid_]").each(function(i, obj) {
			if (obj.checked) {
				g += "," + obj.id.replace("jqg_dataGrid_", "");
			}
		});
		if (g != "") {
			g = g.substring(1);
		}
		return $.trim(g);
	};
	
	function showApproveDialog(type, gridObj, selectIdArray, recordRows){
		
		var prpCodes= getSelOpt();
		if(recordRows==''){
			prpCodes=selectIdArray+'';
		}
		if(prpCodes==""){
			scmError("请选择一条记录");
			return false;
		}
		
		if(type=="approve"){
			
			if(!checkSelect(selectIdArray)){
				return false;
			}
		}
		
		if (type == "approve") {

			var prpnum = prpCodes.split(",").length;
			var isAcceptPdf = "1";

			if (confirm("是否确认受理此" + prpnum + "份申请书?")) {

				var options = {
					type : 'post',
					data : {
						"prpCodes" : prpCodes,
						"status" : '05',
						"isAcceptPdf" : isAcceptPdf
					},
					beforeSend : function() {
					}, // 表单提交前的回调函数
					success : function(msg) {
						if (msg == 'SQLError') {
							prcWin.closeWin();// 关闭遮罩层
							scmError("操作失败！");
						} else {
							if(msg.indexOf("成功")==-1){
								prcWin.closeWin();// 关闭遮罩层
								scmError(msg);
								//irisGrid.getGridDom().jqGrid("refresh", 1);//0是本页1是首页
								return ;
							}else{
							prcWin.closeWin();// 关闭遮罩层
							scmSuccess("操作成功！");
							reflushBu();
							irisGrid.getGridDom().jqGrid("refresh", 1);//0是本页1是首页
							}
						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败！");
						prcWin.closeWin();
					},
					url : "${ctx}/prpapprove/updateCheckedForPaper"
				};
				$.ajax(options);

			}
		}else if (type == "accept") {
			var prpnum = prpCodes.split(",").length;
			if (confirm("是否确认受理此" + prpnum + "份申请书?")) {
				var url = "${ctx}/prpapprove/accept-operate?prpCodes="+prpCodes+"&status=06"+"&operate="+type+"&TB_iframe=true&height=250&width=430";
				tb_show("申报书受理意见（最多为500字）", url, false);
			}
        }else if (type == "cancle") {
        	var prpnum = prpCodes.split(",").length;
			if (confirm("是否确认取消受理此" + prpnum + "份申请书?")) {
			var url = "${ctx}/prpapprove/accept-operate?prpCodes="+prpCodes+"&status=07"+"&operate="+type+"&TB_iframe=true&height=250&width=430";
					tb_show("申报书取消受理意见（最多为500字）", url, false);
			}
		} else if (type == "noticeEmail") {
			var prpnum = prpCodes.split(",").length;
			var isNotice = "1";

			if (confirm("是否确认邮件通知此" + prpnum + "份申请书的项目负责人和单位联系人及项目联系人?")) {

				var options = {
					type : 'post',
					data : {
						"prpCodes" : prpCodes,
						"isNotice" : isNotice
					},
					beforeSend : function() {
					}, // 表单提交前的回调函数
					success : function(msg) {
						try {
							scmSuccess(msg);
							prcWin.closeWin();
							irisGrid.getGridDom().jqGrid("refresh", 1);//0是本页1是首页
						} catch (e) {
						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败！");
						prcWin.closeWin();
					},
					url : "${ctx}/prpapprove/sentEmailNotice?mailCode=${mailTmpCode}&mailCustomCode=${mailCustomTmpCode}"
				};
				$.ajax(options);

			}
		}else if (type == "prpMultiReturn"){
			var prpnum = prpCodes.split(",").length;
			if (confirm("是否确认退回这" + prpnum + "份申请书?")) {
				prpPaperReturn(prpCodes);
			}
		}
		else{
			return;
		}
		
	}
	
	function checkSelect(selectArray){
		var checked = 1;
		$("#approve").removeAttr("disabled");//去除该属性
		var grantcodeStr = "";
		var statYearStr = "";
		for(var i=0;i<selectArray.length;i++){
			var status=irisGrid.getGridDom().jqGrid('getCell',selectArray[i],"13");
			var flagCan=irisGrid.getGridDom().jqGrid('getCell',selectArray[i],"14");
			var grantCode=irisGrid.getGridDom().jqGrid('getCell',selectArray[i],"15");
			var statyear=irisGrid.getGridDom().jqGrid('getCell',selectArray[i],"16");
			if(status=="05"){
				scmWarn("您所选择的这"+selectArray.length+"份申请书中有部分申请书已受理，不允许重复确认!");
				checked = 0;
				break;
			}else if(status=='04'&&flagCan=="0") {
				scmWarn("您所选择的这"+selectArray.length+"份申请书中有部分申请书的正式PDF未生成，请在生成之后再选择该申请书进行受理操作");
				checked = 0;
				break;
			}else{
				grantcodeStr += ","+grantCode;
				statYearStr += ","+statyear;
			}
		}
		if(checked==0){
			return false;
		}else if(grantcodeStr!=""){
			return checklimitInfo(grantcodeStr,statYearStr);
		}
		return true;
	}
	
	function closeDialog(){
		tb_remove();
	}

	
	var editEmail  = function() {
		var url = "${ctx}/mail/update-mailtmp?sourceTmpCodeStr=${mailTmpCode}&tmpCodeStr=${mailCustomTmpCode}&TB_iframe=true&height=360&width=700";
		tb_show("修改邮件通知模板", url, false);
	};
	
		/** 表格初始化**/
		//loadIrisGrid("${res}");
		function buildGrid() {
			
			var columnAttrList = new Array();
			columnAttr = new ColumnAttr("项目类别", "grant_name","grant_name", 6, "left", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("项目名称", "zh_title","zh_title", 6, "left", false);//表头，字段名，，，宽度比例，居左，是否需要表头排序
			columnAttrList.push(columnAttr);
// 			columnAttr = new ColumnAttr("项目类型", "proposal_type_name","proposal_type_name", 4, "center", false);//表头，字段名，，，宽度比例，居左，是否需要表头排序
// 			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("申报单位", "org_name","org_name", 6, "left", false);//表头，字段名，，，宽度比例，居左，是否需要表头排序
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("负责人", "psn_name","psn_name", 4, "left", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("技术领域", "researcharea_name","researcharea_name", 4, "center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("专题名称", "domain_name","domain_name", 4, "center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("提交时间", "submitDate", "submit_date", 5,"left", false);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("受理时间", "accept_date", "accept_date", 5,"left", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("水印号", "prp_version","prp_version", 5, "left", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("受理编号", "prp_no","prp_no", 5, "left", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("归口管理部门", "org_parent_name", "org_parent_name", 5,"center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("工作进度", "statusName", "status", 5,"center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("审核意见", "comment", "comment", 4,"center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("PDF", "pdf", "pdf", 4,"center", false);
			columnAttrList.push(columnAttr);
			
			/* columnAttr = new ColumnAttr("操作", "caozuo", "caozuo", 4,"center", false,false,"text",true);
			columnAttrList.push(columnAttr); */
	        /*  columnAttr = new ColumnAttr("项目比对", "fitCompare", "fitCompare", 3,"center", true,false,"text",false,1);
            columnAttrList.push(columnAttr); */
			columnAttr = new ColumnAttr("操作", "", "", 4,"center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("status", "status", "status", 3,"left",false,false,"text",true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("flagCan", "flagCan", "flagCan", 3,"left", false,false,"text",true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("grantCode", "grantCode", "grantCode", 3,"left", false,false,"text",true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("statYear", "statYear", "statYear", 3,"left", false,false,"text",true);
			columnAttrList.push(columnAttr);
			/* 
			columnAttr = new ColumnAttr("基金委确认时间", "sec_confirm_time", "sec_confirm_time", 3,"left", false);
			columnAttr.setFormatter('date');
			columnAttr.setDateFormat('ISO8601Long'); */
			
			//columnAttrList.push(columnAttr);
			irisGrid.setColumnAttrs(columnAttrList);
			var btn_name = "接收纸质材料";

			irisGrid.setToolsBar([
					{//工具栏建按钮
						id : 'approve',//按钮ID
						name : btn_name,//按钮名称
						trigger : function(gridObj, selectIdArray, recordRows) {//按钮onclick方法 grid本身 选中的行id 总行数
							var checkflag = true;
							var prpCodes = getSelOpt();
							prpCodes = prpCodes + "";
							var num = 0;
							var ps = prpCodes.split(",");
							if (selectIdArray.length > 0) {
								for ( var i = 0; i < ps.length; i++) {
									if ($("#isAcceptPdf_" + ps[i]).val() == 1) {
										num = num + 1;
									}
								}
							}
							if (num > 0) {
								scmError("你选择的项目中有" + num + "个项目不能执行“" + btn_name + "”，请先去除选择");
								checkflag = false;
							}

							if (checkflag) {

								showApproveDialog("approve", gridObj, selectIdArray, recordRows);
							}

						}
					},//工具栏建按钮
					{id : 'prpMultiReturn',//按钮ID
					name : "退回修改",//按钮名称
					trigger : function(gridObj, selectIdArray, recordRows) {//按钮onclick方法 grid本身 选中的行id 总行数
						var checkflag = true;
						var prpCodes = getSelOpt();
						prpCodes = prpCodes + "";
						var num = 0;
						var ps = prpCodes.split(",");
						if (selectIdArray.length > 0) {
							for ( var i = 0; i < ps.length; i++) {
								if (($("#status_" + ps[i]).val() != '05' && $("#status_" + ps[i]).val() != '06') || $("#audit_status_" + ps[i]).val() != '00') {
									num = num + 1;
								}
							}
						}
						if (num > 0) {
							scmError("你选择的项目中有" + num + "个项目不能执行“" + "退回修改" + "”，请先去除选择");
							checkflag = false;
						}

						if (checkflag) {

							showApproveDialog("prpMultiReturn", gridObj, selectIdArray, recordRows);
						}

					}
				}
			]);
			
			irisGrid.setUrl("${ctx}/prpapprove/list-for-receive-paper?stat_year=${param.stat_year}");//查询url
			irisGrid.setCaption("暂写");
			irisGrid.setDefaultSortName("prp_version");//默认排序字段
			irisGrid.setDefaultSortorder("asc");
			irisGrid.setWidth(978);//整个表格宽度
			irisGrid.setLazyLoad(true);
			irisGrid.setCheckAble(true);//表格左边是否要复选框
			irisGrid.setShowRowIndex(true);//是否显示行号
			irisGrid.setQueryBox('searchBt', 'a', ["hid_slprpno"]);//查询条件 按钮名，查询条件function_key
			
			irisGrid.setLoadComplete(setGray);
			irisGrid.onSelectAll = function(selectid,isSelect){//全选事件
				checkSelectAll();
			};
			irisGrid.onSelectRow = function(selectid,isSelect){//全选事件
				checkSelectAll();
			};
			
			irisGrid.build();
		}
		
		function checkSelectAll(){
			$("input:checkbox[id^=jqg_dataGrid_]").each(function(i, obj) {
				if($(obj).attr("disabled")){
					$(obj).attr("checked",false);
				}
			});
		}
		
		
		function setGray(){
			var role = '<c:out value="${role}"/>';
			$("input:checkbox[id^=jqg_dataGrid_]").each(function(i, obj) {
				var id = $(obj).attr("id").replace("jqg_dataGrid_", "");
				var status = $.trim($("#status_"+id).html());
				if(role=='danwei'){
					if(status=="01"){
						$(obj).attr("disabled",false);
						$("#agree_"+id).show();
						$("#refuse_"+id).show();
					}else{
						$(obj).attr("disabled",true);
						$("#agree_"+id).hide();
						$("#refuse_"+id).hide();
					}
				}else if(role=='chushi'){
					if(status=="04" || status=="03"){
						$(obj).attr("disabled",false);
						$("#agree_"+id).show();
						$("#refuse_"+id).show();
					}else if(status=="05"){
						$(obj).attr("disabled",false);
						$("#agree_"+id).show();
						$("#refuse_"+id).show();
					}else{
						$(obj).attr("disabled",true);
						$("#agree_"+id).hide();
						$("#refuse_"+id).hide();
					}
				}
			});
	}
		
		jQuery(function() {
			
			buildGrid();
	//		if($.browser.msie && $.browser.version<8)
	//			$("#return").addClass("button_orange").css("margin-left","166px");
	//		else
	//			$("#return").addClass("button_orange").css("margin-left","157px");
			
			$("#slprpno").focus();
		});
		/** 表格初始化**/
		
		function cleanQueryBox(){
			$("[id^='_dyn_criteria'][id$='_c']", "#prpApprove_search4org").each(function(){
				$(this).children().each(function(){
					$(this).val('');
				});
			});
		}
		
		function viewComment(des3Prpcode){
			var url="${ctx}/proposal/view/audit-comment-view?posCode="+des3Prpcode+"&TB_iframe=true&height=390&width=720";
			var title="审核意见";
			showThickBox(url,title);	
		}
		
		// 接受、取消材料
		function updateForPaper(prpCode, num) {
			var name = "";
			if (num == 1)
				name = "是否确认接收此份纸质材料?";
			if (confirm(name)) {

				var options = {
					type : 'post',
					data : {
						"prpCodes" : prpCode,
						"status"  : '05,06'
					
					},
					beforeSend : function() {
					}, // 表单提交前的回调函数
					success : function(msg) {
						if (msg == 'SQLError') {
							prcWin.closeWin();// 关闭遮罩层
							scmError("操作失败！");
						} else {
							prcWin.closeWin();// 关闭遮罩层
							scmSuccess("操作成功！");
							reflushBu();
							irisGrid.getGridDom().jqGrid("refresh", 0);//0是本页1是首页
							

						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败！");
						prcWin.closeWin();
					},
					url : "${ctx}/prpapprove/updateCheckedForPaper"
				};

				$.ajax(options);

			}

		}
		
		//判断能否退回修改
		function beforePrpPaperReturn(prpCode){
			var options = {
					type : 'post',
					data : {
						"prpCode" : prpCode
					},
					beforeSend : function() {
					}, // 表单提交前的回调函数
					success : function(msg) {
						if (msg == 'SQLError') {
							scmError("操作失败，请联系管理员！");
							//提示不能退回
						} else if (msg == '0') {
							//可以退回
							prpPaperReturn(prpCode);
						}else if (msg == '1') {
							//不可以退回
							scmSuccess("该项目已经进入立项阶段，不能退回！");
						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败！");
					},
					url : "${ctx}/appProject/sureUpdateCheckedForPaper"
				};

				$.ajax(options);
		}
		
		function prpPaperReturn(prpCode){
			var url = "${ctx}/prpapprove/prp-paper-return?prpCodes="+prpCode+"&status=05,06&TB_iframe=true&height=250&width=410";
			tb_show("退回修改意见（最多为500字）", url, false);
		}
		
		
		/**检查选中项目限项设置**/
		function checklimitInfo(grantcodeStr,statYearStr){
			var checked = 1;
			var msg = "";
			if(grantcodeStr!=""&&'${limitinfo}'!=''){
				grantcodeStr = grantcodeStr.substring(1);
				statYearStr = statYearStr.substring(1);
				var linfoArr = '${limitinfo}'.split(",");
				for(var i=0;i<linfoArr.length;i++){
					var sublinfoArr = linfoArr[i].split("##");//grant_code##grant_name##limit_count##approved_count
					var grantCode1 = sublinfoArr[0];
					var grantName = sublinfoArr[1];
					var limitCount = sublinfoArr[2];
					var approvedCount = sublinfoArr[3];
					var statYear = sublinfoArr[4];
					var grantcodeArr = grantcodeStr.split(",");
					var statYearArr = statYearStr.split(",");
					var selected = 0;
					for(var j=0;j<grantcodeArr.length;j++){
						if(grantcodeArr[j]==grantCode1 && statYearArr[j]==statYear){
							selected++;
						}
					}
					if(selected>0){
					var checkNum = parseInt(approvedCount)+selected;
						if(checkNum>parseInt(limitCount)){
							checked = 0;
							var shen = parseInt(limitCount,10)-parseInt(approvedCount,10);
							if(shen<0){
								shen = 0;
							}
							msg = "您单位申报"+statYear+"年度"+grantName+"类别的项目仅能申报"+limitCount+"项，目前已经上报了"+approvedCount+"项，还能上报"+shen+"项.";
							break;
						}
					}
				}
			}
			if(checked>0){
				return true;
			}
			scmWarn(msg, null, 7000);
			return false;
			
		}
	</script>
	<script>
	function slEvent(event){
		if(event.keyCode==13){   
			if($.trim($("#slprpno").val()).length!=12 && currefresh){
				if($.trim($("#slprpno").val()).length == 0){
					return false;
				}
				scmWarn("水印号不正确，应为12位数字！");
				$("#slprpno").val("");
				return false;
			}else{
				var curVal = $("#slprpno").val();
				  var hidVal = $("#hid_slprpno").val();
				  if(curVal != null && curVal != ''){
					  if(hidVal == null || hidVal == ''){
						  $("#hid_slprpno").val(curVal);
					  }else if((","+hidVal+",").indexOf(","+curVal+",")<0){
						  hidVal = curVal+","+hidVal;
						  $("#hid_slprpno").val(hidVal);
					  }
					  $("#slprpno").val('');
					  $("#slprpno").focus();
					  currefresh = false;
					  $("#searchBt").click();
					 
					  return;
			  }
			//irisGrid.setQueryBox('searchBt', 'a', ["hid_slprpno"]);//查询条件 按钮名，查询条件function_key
			//irisGrid.build();
			currefresh = true;
			}
		}
	}
	
	
	
	function slEvent2(event){
			if($.trim($("#slprpno").val()).length!=12 && currefresh){
				if($.trim($("#slprpno").val()).length == 0){
					return false;
				}
				return false;
			}else{
				var curVal = $("#slprpno").val();
				  var hidVal = $("#hid_slprpno").val();
				  if(curVal != null && curVal != ''){
					  if(hidVal == null || hidVal == ''){
						  $("#hid_slprpno").val(curVal);
					  }else if((","+hidVal+",").indexOf(","+curVal+",")<0){
						  hidVal = curVal+","+hidVal;
						  $("#hid_slprpno").val(hidVal);
					  }
					  $("#slprpno").val('');
					  $("#slprpno").focus();
					  currefresh = false;
					  $("#searchBt").click();
					 
					  return;
			  }
			currefresh = true;
			}
	}
	
	
	
	function handQuery(){
		if($.trim($("#slprpno").val()).length!=12 && currefresh){
			if($.trim($("#slprpno").val()).length == 0){
				return false;
			}
			scmWarn("水印号不正确，应为12位数字！");
			$("#slprpno").val("");
			return false;
		}else{
		  var curVal = $("#slprpno").val();
		  var hidVal = $("#hid_slprpno").val();
		  if(curVal != null && curVal != ''){
			  if(hidVal == null || hidVal == ''){
				  $("#hid_slprpno").val(curVal);
			  }else if((","+hidVal+",").indexOf(","+curVal+",")<0){
				  hidVal += ","+curVal;
				  $("#hid_slprpno").val(hidVal);
			  }
			  $("#slprpno").val('');
			  $("#slprpno").focus();
			  //$("#searchBt").click();
		  }
		//irisGrid.setQueryBox('searchBt', 'a', ["hid_slprpno"]);//查询条件 按钮名，查询条件function_key
		//irisGrid.build();
		currefresh=true;
		}
	}
	
	
	function clearQuery(){
		$("#hid_slprpno").val("-1");
		$("#slprpno").focus();
	   currefresh = false;
	   $("#dataGrid").find("tr:gt(0)").remove();
	   $("#sp_1_dataBar").text("0");
	   $("#sp_2_dataBar").text("0");
	   $("#sp_1_TopBarMnt").text("0");
	   $("#sp_2_TopBarMnt").text("0");
	   //$("#searchBt").click();
	   return;
	}
	
	
	function acceptOperate(prpCode,status,operate){
		var title="";
	    if(operate=='accept'){
	    	title="申报书受理意见（最多为500字）";
	    }else if(operate=="cancle"){
	    	title="申报书取消受理意见（最多为500字）";
	    }
		var url = "${ctx}/prpapprove/accept-operate?prpCodes="+prpCode+"&status="+status+"&operate="+operate+"&TB_iframe=true&height=250&width=430";
		//var url = "${ctx}/prpapprove/prp-paper-return?prpCodes="+prpCode+"&TB_iframe=true&height=250&width=410";
		tb_show(title, url, false);
	}
	
	
	
	/** 显示工作进度 */
	function showPrjProgress(keyCode,progressCode){
		var url = ctx + "/prpapprove/showPrjProgress";
		url = url + "?keyCodeStr="+keyCode+"&progressCode="+progressCode;
		url = url + "&TB_iframe=true&height=500&width=700";	
		tb_show("工作进度",url, false);
	}
	</script>
</body>
</html>